
<%@ page import="teste.Pessoa" %>
<!doctype html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="layout" content="kickstart" />
	<g:set var="entityName" value="${message(code: 'pessoa.label', default: 'Pessoa')}" />
	<title><g:message code="default.list.label" args="[entityName]" /></title>
</head>

<body>

<div class="row">

  <div class="span3">
     <g:set var="selectedId" value="0" />
     <g:set var="activeMenuItem" value="mni_List" />
     <g:render template="menu"/>
  </div>
  
  <div class="span9">
			<section id="list-pessoa" class="first">
			
				<table class="table table-bordered" ng-controller="GridCtrl">
					<thead>
					
						<tr>
						<th>(*)</th>
						
							<g:sortableColumn property="dataNascimento" title="${message(code: 'pessoa.dataNascimento.label', default: 'Data Nascimento')}" />
						
							<g:sortableColumn property="nome" title="${message(code: 'pessoa.nome.label', default: 'Nome')}" />
						
							<g:sortableColumn property="peso" title="${message(code: 'pessoa.peso.label', default: 'Peso')}" />
						
						</tr>
					</thead>
					<tbody>
					
					<g:each in="${pessoaInstanceList}" status="i" var="pessoaInstance">
					    
						<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
						<td><input type="radio" ng-model="selectedId" value="${pessoaInstance.id}" ng-click="onGridItemSelected(${pessoaInstance.id})"></td>
						
							<td><g:link action="show" id="${pessoaInstance.id}">${fieldValue(bean: pessoaInstance, field: "dataNascimento")}</g:link></td>
						
							<td>${fieldValue(bean: pessoaInstance, field: "nome")}</td>
						
							<td>${fieldValue(bean: pessoaInstance, field: "peso")}</td>
						
						</tr>
					</g:each>
					</tbody>
				</table>
				<div class="pagination">
					<bs:paginate total="${pessoaInstanceTotal}" />
				</div>
			</section>
  </div>
</div>
</body>

</html>
